package com.centit.framework.ip.templateFile.po;

import java.util.Date;
import java.sql.Timestamp;
import javax.persistence.Column;


import javax.persistence.Id;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;


import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;


/**
 * create by scaffold 2018-06-05 
 * @author codefan@sina.com
 
  流程与文书的映射关系表流程与文书的映射关系表   
*/
@Entity
@Table(name = "OPT_STUFF_INFO")
public class OptStuffInfo implements java.io.Serializable {
	private static final long serialVersionUID =  1L;



	/**
	 * 材料id 材料id 
	 */
	@Id
	@Column(name = "STUFFID")
	
	private String stuffid;

	/**
	 * 环节id 环节id 
	 */
	@Column(name = "NODEINSTID")
	private Long  nodeinstid;
	/**
	 * 办件id 办件id 
	 */
	@Column(name = "DJ_ID")
	@Length(min = 0, max = 100, message = "字段长度不能小于{min}大于{max}")
	private String  djId;
	/**
	 * 附件类型 附件类型 
	 */
	@Column(name = "filetype")
	@Length(min = 0, max = 100, message = "字段长度不能小于{min}大于{max}")
	private String  filetype;
	/**
	 * 分组id 分组id 
	 */
	@Column(name = "GROUPID")
	@Length(min = 0, max = 100, message = "字段长度不能小于{min}大于{max}")
	private String  groupid;
	/**
	 * 类别id 类别id 
	 */
	@Column(name = "SORTID")
	@Length(min = 0, max = 100, message = "字段长度不能小于{min}大于{max}")
	private String  sortid;
	/**
	 * 文件服务对应id 文件服务对应id 
	 */
	@Column(name = "FILEID")
	@Length(min = 0, max = 1000, message = "字段长度不能小于{min}大于{max}")
	private String  fileid;
	/**
	 * 创建时间 创建时间 
	 */
	@Column(name = "CREATETIME")
	private Date  createtime;
	/**
	 * 文件名称 文件名称 
	 */
	@Column(name = "FILENAME")
	@Length(min = 0, max = 150, message = "字段长度不能小于{min}大于{max}")
	private String  filename;
	/**
	 * 用户编码 用户编码 
	 */
	@Column(name = "USERCODE")
	@Length(min = 0, max = 50, message = "字段长度不能小于{min}大于{max}")
	private String  usercode;
	/**
	 * 正文标记 正文标记 
	 */
	@Column(name = "ARCHIVETYPE")
	@Length(min = 0, max = 20, message = "字段长度不能小于{min}大于{max}")
	private String  archivetype;
	/**
	 * 删除标记 删除标记 
	 */
	@Column(name = "ISUSE")
	@Length(min = 0, max = 2, message = "字段长度不能小于{min}大于{max}")
	private String  isuse;

	// Constructors
	/** default constructor */
	public OptStuffInfo() {
	}
	/** minimal constructor */
	public OptStuffInfo(
		String stuffid		
		) {
	
	
		this.stuffid = stuffid;		
			
	}

/** full constructor */
	public OptStuffInfo(
	 String stuffid		
	,Long  nodeinstid,String  djId,String  filetype,String  groupid,String  sortid,String  fileid,Date  createtime,String  filename,String  usercode,String  archivetype,String  isuse) {
	
	
		this.stuffid = stuffid;		
	
		this.nodeinstid= nodeinstid;
		this.djId= djId;
		this.filetype= filetype;
		this.groupid= groupid;
		this.sortid= sortid;
		this.fileid= fileid;
		this.createtime= createtime;
		this.filename= filename;
		this.usercode= usercode;
		this.archivetype= archivetype;
		this.isuse= isuse;		
	}
	

  
	public String getStuffid() {
		return this.stuffid;
	}

	public void setStuffid(String stuffid) {
		this.stuffid = stuffid;
	}
	// Property accessors
  
	public Long getNodeinstid() {
		return this.nodeinstid;
	}
	
	public void setNodeinstid(Long nodeinstid) {
		this.nodeinstid = nodeinstid;
	}
  
	public String getDjId() {
		return this.djId;
	}
	
	public void setDjId(String djId) {
		this.djId = djId;
	}
  
	public String getFiletype() {
		return this.filetype;
	}
	
	public void setFiletype(String filetype) {
		this.filetype = filetype;
	}
  
	public String getGroupid() {
		return this.groupid;
	}
	
	public void setGroupid(String groupid) {
		this.groupid = groupid;
	}
  
	public String getSortid() {
		return this.sortid;
	}
	
	public void setSortid(String sortid) {
		this.sortid = sortid;
	}
  
	public String getFileid() {
		return this.fileid;
	}
	
	public void setFileid(String fileid) {
		this.fileid = fileid;
	}
  
	public Date getCreatetime() {
		return this.createtime;
	}
	
	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
  
	public String getFilename() {
		return this.filename;
	}
	
	public void setFilename(String filename) {
		this.filename = filename;
	}
  
	public String getUsercode() {
		return this.usercode;
	}
	
	public void setUsercode(String usercode) {
		this.usercode = usercode;
	}
  
	public String getArchivetype() {
		return this.archivetype;
	}
	
	public void setArchivetype(String archivetype) {
		this.archivetype = archivetype;
	}
  
	public String getIsuse() {
		return this.isuse;
	}
	
	public void setIsuse(String isuse) {
		this.isuse = isuse;
	}



	public OptStuffInfo copy(OptStuffInfo other){
  
		this.setStuffid(other.getStuffid());
  
		this.nodeinstid= other.getNodeinstid();  
		this.djId= other.getDjId();  
		this.filetype= other.getFiletype();  
		this.groupid= other.getGroupid();  
		this.sortid= other.getSortid();  
		this.fileid= other.getFileid();  
		this.createtime= other.getCreatetime();  
		this.filename= other.getFilename();  
		this.usercode= other.getUsercode();  
		this.archivetype= other.getArchivetype();  
		this.isuse= other.getIsuse();

		return this;
	}
	
	public OptStuffInfo copyNotNullProperty(OptStuffInfo other){
  
	if( other.getStuffid() != null){
	this.setStuffid(other.getStuffid());}
  
		if( other.getNodeinstid() != null){
		this.nodeinstid= other.getNodeinstid();}  
		if( other.getDjId() != null){
		this.djId= other.getDjId();}  
		if( other.getFiletype() != null){
		this.filetype= other.getFiletype();}  
		if( other.getGroupid() != null){
		this.groupid= other.getGroupid();}  
		if( other.getSortid() != null){
		this.sortid= other.getSortid();}  
		if( other.getFileid() != null){
		this.fileid= other.getFileid();}  
		if( other.getCreatetime() != null){
		this.createtime= other.getCreatetime();}  
		if( other.getFilename() != null){
		this.filename= other.getFilename();}  
		if( other.getUsercode() != null){
		this.usercode= other.getUsercode();}  
		if( other.getArchivetype() != null){
		this.archivetype= other.getArchivetype();}  
		if( other.getIsuse() != null){
		this.isuse= other.getIsuse();}		

		return this;
	}

	public OptStuffInfo clearProperties(){
  
		this.nodeinstid= null;  
		this.djId= null;  
		this.filetype= null;  
		this.groupid= null;  
		this.sortid= null;  
		this.fileid= null;  
		this.createtime= null;  
		this.filename= null;  
		this.usercode= null;  
		this.archivetype= null;  
		this.isuse= null;

		return this;
	}
}
